#include <iostream>

using namespace std;

int main()
{
    long foo, bar;
    cout << "Please enter a nonnegative integer: ";
    
    cin >> foo;
    foo = foo < 1 ? 1 : foo;
    bar = foo;

    while (foo > 1) {
        foo -= 1;
        bar *= foo;
    }

    cout << "It's factorial is " << bar;
    return 0;
}
